Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema conversion improvements #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jverhoeven
Copy link

Your cashay client looks great, but got stuck at step 1 when trying to introspect/minimize my schema from my Django Graphql server (and thus had no JS GraphQLSchema file).

Changes:
HTTP schema request requires application/json header (at least on some servers).
When requested over HTTP, the schema is already introspected, so only minimize.
Also allow introspected schema reading via file.

…on some servers).

When requested over HTTP, the schema is already introspected, so only minimize.
Also allow introspected schema reading via file.
@coveralls
Copy link

coveralls commented Dec 7, 2016

Coverage Status

Coverage remained the same at 76.305% when pulling 7cc33fe on jverhoeven:master into 1ab2e45 on mattkrick:master.

@mattkrick
Copy link
Owner

Thanks for the PR! At first glance this looks good, I've got some time to test it tomorrow night to see if it works in all cases. I'm curious how you were able to get rid of doing a require(foo).default after transpiling.

@jverhoeven
Copy link
Author

Thanks. Regarding the require(foo).default I am afraid ignorance is bliss. I needed to just do a require without '.default' to allow already introspected JSON schemas as well. Did not run into problems myself, so let me know if this is an issue in use cases beyond my test scope.

@theobat
Copy link
Contributor

theobat commented Jan 25, 2017

Can I provide any help with tests to merge this PR ? doesn't seem like a big deal at first glance...

Thanks. Regarding the require(foo).default I am afraid ignorance is bliss. I needed to just do a require without '.default' to allow already introspected JSON schemas as well. Did not run into problems myself, so let me know if this is an issue in use cases beyond my test scope.

Perhaps we need tests in different context for the require ? I don't really see how to do that though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants